/* H5地图组件样式 */
.ditu1-container {
  width: 100%;
  height: 100vh;
  position: relative;
  background-color: #f5f5f5;
}

/* 地图容器 */
.map-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* 搜索栏样式 */
.search-bar {
  position: absolute;
  top: -80px;
  left: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.95);
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

.search-input:focus {
  border-color: #007bff;
}

.search-btn {
  padding: 8px 16px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-btn:hover {
  background: #0056b3;
}

.search-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 控制面板样式 */
.control-panel {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

/* 移动端控制面板 */
.control-panel-mobile {
  position: absolute;
  top: 80px;
  left: 10px;
  right: 10px;
  z-index: 1000;
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 功能按钮组 */
.function-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.function-button {
  flex: 1;
  min-width: 120px;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: #2196f3;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.function-button:hover {
  background: #1976d2;
}

.function-button.active {
  background: #ff9800;
}

.function-button.cluster.active {
  background: #4caf50;
}

.function-button.cluster {
  background: #9e9e9e;
}

/* 搜索按钮 */
.search-button {
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  background: #1976d2;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  min-width: 80px;
  transition: background-color 0.3s;
}

.search-button:hover {
  background: #1565c0;
}

/* 聚合样式按钮 */
.cluster-style-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cluster-style-button {
  flex: 1;
  min-width: 80px;
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: #e0e0e0;
  color: #333;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.3s;
}

.cluster-style-button:hover {
  background: #d5d5d5;
}

.cluster-style-button.active {
  background: #673ab7;
  color: #fff;
}

/* 位置信息 */
.location-info {
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  padding: 8px;
  border-radius: 6px;
}

/* 导航控制 */
.navigation-controls {
  display: flex;
  gap: 8px;
}

.navigation-button {
  flex: 2;
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  background: #4caf50;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.navigation-button:hover {
  background: #45a049;
}

.navigation-button.disabled {
  background: #ccc;
  cursor: not-allowed;
}

.clear-route-button {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  background: #f44336;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.clear-route-button:hover {
  background: #d32f2f;
}

.control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.control-row:last-child {
  margin-bottom: 0;
}

.control-btn {
  padding: 8px 12px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin: 0 4px;
}

.control-btn:hover {
  background: #1e7e34;
}

.control-btn.active {
  background: #dc3545;
}

.control-btn.active:hover {
  background: #c82333;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zoom-btn {
  width: 32px;
  height: 32px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.zoom-btn:hover {
  background: #0056b3;
}

.zoom-level {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  min-width: 40px;
  text-align: center;
}

/* 状态指示器 */
.status-indicator {
  position: absolute;
  top: 80px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: #666;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-indicator.loading {
  color: #007bff;
}

.status-indicator.navigating {
  color: #28a745;
}

/* 聚合控制样式 */
.cluster-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cluster-toggle {
  padding: 6px 10px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.cluster-toggle:hover {
  background: #545b62;
}

.cluster-toggle.active {
  background: #007bff;
}

.cluster-style-btn {
  padding: 4px 8px;
  background: #e9ecef;
  color: #495057;
  border: 1px solid #ced4da;
  border-radius: 3px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.cluster-style-btn:hover {
  background: #dee2e6;
}

.cluster-style-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .search-bar {
    top: 10px;
    left: 10px;
    right: 10px;
    padding: 8px;
  }
  
  .search-input {
    font-size: 16px; /* 防止iOS缩放 */
  }
  
  .control-panel {
    bottom: 10px;
    left: 10px;
    right: 10px;
    padding: 12px;
  }
  
  .control-row {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .cluster-controls {
    justify-content: center;
  }
  
  .control-btn {
    margin: 2px;
    font-size: 11px;
  }
  
  .status-indicator {
    top: 60px;
    right: 10px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .search-bar {
    flex-direction: column;
    gap: 8px;
  }
  
  .control-panel {
    padding: 8px;
  }
  
  .zoom-controls {
    justify-content: center;
  }
}